package com.iflytek.jobs.service.service.impl;

import com.iflytek.jobs.service.domain.StuLevel;
import com.iflytek.jobs.service.mapper.StuLevelMapper;
import com.iflytek.jobs.service.service.IStuLevelService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 学生能力Service业务层处理
 * 
 * @author chenhs
 * @date 2023-06-01
 */
@Service
public class StuLevelServiceImpl implements IStuLevelService
{
    @Autowired
    private StuLevelMapper stuLevelMapper;

    /**
     * 查询学生能力
     * 
     * @param psId 学生能力主键
     * @return 学生能力
     */
    @Override
    public StuLevel selectStuLevelByPsId(Integer psId)
    {
        return stuLevelMapper.selectStuLevelByPsId(psId);
    }

    /**
     * 查询学生能力列表
     * 
     * @param stuLevel 学生能力
     * @return 学生能力
     */
    @Override
    public List<StuLevel> selectStuLevelList(StuLevel stuLevel)
    {
        return stuLevelMapper.selectStuLevelList(stuLevel);
    }

    /**
     * 新增学生能力
     * 
     * @param stuLevel 学生能力
     * @return 结果
     */
    @Override
    public int insertStuLevel(StuLevel stuLevel)
    {
        stuLevel.setCreateTime(DateUtils.getNowDate());
        return stuLevelMapper.insertStuLevel(stuLevel);
    }

    /**
     * 修改学生能力
     * 
     * @param stuLevel 学生能力
     * @return 结果
     */
    @Override
    public int updateStuLevel(StuLevel stuLevel)
    {
        stuLevel.setUpdateTime(DateUtils.getNowDate());
        return stuLevelMapper.updateStuLevel(stuLevel);
    }

    /**
     * 批量删除学生能力
     * 
     * @param psIds 需要删除的学生能力主键
     * @return 结果
     */
    @Override
    public int deleteStuLevelByPsIds(Integer[] psIds)
    {
        return stuLevelMapper.deleteStuLevelByPsIds(psIds);
    }

    /**
     * 删除学生能力信息
     * 
     * @param psId 学生能力主键
     * @return 结果
     */
    @Override
    public int deleteStuLevelByPsId(Integer psId)
    {
        return stuLevelMapper.deleteStuLevelByPsId(psId);
    }
}
